package com.example.demo.程序员面试金典;

/**
 * @description: TODO
 * @author: zhangzc
 * @modified By: zhangzc
 * @date: Created in 2022/9/8 14:32
 * @version:v1.0
 */
public class 配对交换 {

	//
	class Solution {

		public int exchangeBits(int num) {
			return ((num & 0x55555555) << 1) | ((num & 0xaaaaaaaa)) >> 1;
		}
	}

}
